package com.zjmzxfzhl.modules.flowable.controller;

import com.zjmzxfzhl.common.core.base.BaseController;
import io.dshubs.commons.tools.utils.Result;
import io.dshubs.dto.SysTenantDTO;
import io.dshubs.feign.TenantFeignClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: yu
 * @Date: 2021/08/18/18:07
 */
@RestController
@Api(tags = "租户管理")
@RequestMapping("/sys/tenant")
public class SysFlowableTenantController extends BaseController {

    @Autowired
    private TenantFeignClient tenantFeignClient;

    @GetMapping("/listAll")
    @ApiOperation("返回所有租户信息")
    public Result<List<SysTenantDTO>> listAll() {
        return tenantFeignClient.getTenantList();
    }
}
